<template>
  <div class="footer">
    <van-goods-action>
      <van-goods-action-icon icon="chat-o" text="客服" @click="onClickIcon" />
      <van-goods-action-icon icon="cart-o" text="购物车" @click="onClickIcon" />
      <van-goods-action-icon icon="shop-o" text="店铺" @click="onClickIcon" />
      <van-goods-action-button
        type="danger"
        text="立即购买"
        @click="onClickButton"
      />
    </van-goods-action>
  </div>
</template>

<script>

export default {
  methods: {
    onClickIcon() {
    //   Toast("点击图标");
    },
    onClickButton() {
    //   Toast("点击按钮");
      //  this.$router.push({name:"shopcart",path:'/cart/shopcart'})
      this.$router.push('/cart')
      this.$http({
        url:" http://localhost:3000/cart",
        method:"post",
        data:{
           "sell":'满10减10',
            "src":"https://hshopb.honorfile.com/pimages/product/6936520815791/428_428_46784B9D8F29C8F9CF8334C3279C9ED5E99D93B961DAA466mp.png",
            "name":"荣耀X40 8GB+64GB 幻境星空 双卡全网通版",
            "pz":"幻境星空，5G全网通 8GB+128GB，官方...",
            "activeO":"一站式换新",
            "activeT":"积分红包",
            "price":"2099",
            "num":"1"
        }
      }).then((res)=>{
        console.log(res.data)
      })
    },
  },
};
</script>

<style scoped>
  
  .footer{
    position: sticky;
    bottom: 0;
    width: 100%;
  }
</style>